<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page import="com.jm.pojo.*" %>
<%@taglib prefix="s" uri="/struts-tags" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'login.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<script type="text/javascript"> 

	function DFromLst(){ 
	    if(confirm('确认删除已选择数据吗?')){ 
		    var form1 = document.getElementById("form1");
	        form1.action="/practiesCheckBox_008/user/moveUser"; 
	        form1.submit(); 
	    } 
	} 
	</script> 


  </head>
  
  <body>
  	
	<hr/>
		<form  action=""  method="post" id="form1" name="form1">
		<input type="button" name="button1" id="button1"  value="删除" onclick="DFromLst();" />
		<input type="button" name="button2" id="button2" value="添加" onclick="Javascript:location.href='/practiesCheckBox_008/page/user/addUser.jsp?'"/>
		<table border="1" width="100%">
			<tr>
				<th>&nbsp;</th>
				<th>用户名</th>
				<th>密&nbsp;&nbsp;&nbsp;码</th>
				<th>删&nbsp;&nbsp;&nbsp;除</th>
				<th>修&nbsp;&nbsp;&nbsp;改</th>
			</tr>
			<s:iterator value="users" var="u">
				<tr>
					<td align="center"><input type="checkbox"  name="userCheck" id="user" value="<s:property value="#u.name"/> "></td>
					<td align="center"><s:property value="#u.name"/> </td>
					<td align="center"><s:property value="#u.password"/> </td>
					<td align="center"><a href="user/delUser?id=<s:property value="#u.id"/>&name=<s:property value="#u.name"/>&password=<s:property value="#u.password" /> " onclick="return confirm('确定删除该记录吗?')">删除用户</a> </td>
					<td align="center"><a href="page/user/changeUser.jsp?id=<s:property value="#u.id"/>&name=<s:property value="#u.name"/>&password=<s:property value="#u.password"/>">修改用户</a></td>
				</tr>
			</s:iterator>
		</table>
		</form>
  </body>
</html>
